"""
__author__ = '霍格沃兹测试开发学社'
__desc__ = '更多测试开发技术探讨，请访问：https://ceshiren.com/t/topic/15860'
"""
from backstage_management.api.base_api import BaseApi


class Goods(BaseApi):

    def list(self, goods_name):
        path = "wx/goods/list"
        goods_param = {"keyword": goods_name, "page": 1, "limit": 10}
        r = self.send("get", path, params=goods_param)
        return r

    def detail(self, goods_id):
        path = "wx/goods/detail"
        detail_param = {"id": goods_id}
        r = self.send("get", path, params = detail_param)
        return r